﻿using System;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Values;

namespace Acme.BookStore2
{
    /// <summary>
    /// 附件
    /// </summary>
    public class AttachFile : ValueObject
    {
        public int Id { get; private set; }
        /// <summary>
        /// 文件名称
        /// </summary>
        public virtual string FileName { get; private set; }
        /// <summary>
        /// BlobContainer名称
        /// </summary>
        public virtual string BlobContainerName { get; private set; }
        /// <summary>
        /// Blob名称
        /// </summary>
        public virtual string BlobName { get; private set; }

        protected AttachFile()
        {
            
        }

        public AttachFile(string blobContainerName, string blobName, string fileName)
        {
            BlobContainerName = blobContainerName;
            BlobName = blobName;
            FileName = fileName;
        }
        
        protected override IEnumerable<object> GetAtomicValues()
        {
            yield return BlobContainerName;
            yield return BlobName;
            yield return FileName;
        }
    }
}